package com.school.entity;

/**
 * 课程实体类：存储课程信息（无继承，仅作为数据载体，属性私有保证封装）
 */
public class Course {
    private String courseId;   // 课程编号
    private String courseName; // 课程名称
    private String location;   // 上课地点
    private String time;       // 上课时间

    // 构造方法：初始化课程所有属性
    public Course(String courseId, String courseName, String location, String time) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.location = location;
        this.time = time;
    }

    // Getter方法：外部通过Getter访问私有属性（封装性体现）
    public String getCourseId() {
        return courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public String getLocation() {
        return location;
    }

    public String getTime() {
        return time;
    }
}